package com.free.system.api;

import com.free.system.api.factory.RemoteRecognitionFallbackFactory;
import com.huaweicloud.sdk.image.v2.model.ImageTaggingItemBody;
import com.huaweicloud.sdk.image.v2.model.ImageTaggingReq;
import com.free.common.core.constant.ServiceNameConstants;
import com.free.common.core.web.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 用户服务
 *
 * @author free
 */
@FeignClient(contextId = "remoteRecognitionService" , value = ServiceNameConstants.FREE_RECOGNITION, fallbackFactory = RemoteRecognitionFallbackFactory.class)
public interface RemoteRecognitionService {
    /**
     * 图片的ai识别能力
     *
     * @param body
     * @return
     */
    @PostMapping("/recognitionImages" )
    public R<List<ImageTaggingItemBody>> recognitionImages(@RequestBody ImageTaggingReq body);
    /**
     * 图片的ai识别能力
     *
     * @param body
     * @return
     */
    @PostMapping("/xfAudio/uploadAudioFile" )
    public R<String> xfAudioUpload(@RequestBody String body);
    /**
     * 图片的ai识别能力
     *
     * @param body
     * @return
     */
    @PostMapping("/xfAudio/getContent" )
    public R<String> xfAudioGetContent(@RequestBody String body);

    /**
     * 创建任务
     *
     * @param body
     * @return
     */
    @PostMapping("/baidu/create" )
    public R<String> baiduCreate(@RequestBody String body);
    /**
     *获取任务状态
     *
     * @param body
     * @return
     */
    @PostMapping("/baidu/getResult" )
    public R<String> baiduAudioGetContent(@RequestBody String body);


}
